package com.iflytek.cosmo.ocr.web.controller;

import com.iflytek.cosmo.ocr.model.domain.OutputMessage;
import com.iflytek.cosmo.ocr.service.DataBaseModifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ViviZhou
 * @create 2019-10-2019/10/25 16:00
 */
@Api(value = "将原始数据库数据关联到现有用户下", tags = "数据库原始文件转移到相应用户我的文件夹下")
@RequestMapping("/dataTransfer")
@RestController
public class DataBaseModifyController {
    @Autowired
    private DataBaseModifyService dataBaseModifyService;

    @ApiOperation(value = "数据库文件分组", notes = "数据库文件分组", httpMethod = "POST")
    @PostMapping(value = "/file/group/{dirId}")
    public OutputMessage modifyDirId(@PathVariable("dirId") String dirId){
        if ("dirId".equals(dirId)){
            return dataBaseModifyService.modifyDirId();
        }
        return new OutputMessage(1,"","数据迁移失败");
    }
}
